package com.cg.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cg.dao.AnnouncementDao;
import com.cg.entity.Announcement;
import com.cg.entity.BaseBusiness;
import com.cg.utils.R;


@Service("announceService")
public class AnnouncementServiceImpl{

	@Autowired
	AnnouncementDao announcementDao;
	
	
	public List<Announcement> queryList(Map<String, Object> params) {
		
		return announcementDao.queryList(params);
	}
	
	/**
	 * 查询总数
	 */
	public int queryTotal(Map<String, Object> map) {
		
		return announcementDao.queryTotal(map);
	}
	
	public R save(Announcement announcement) {
		announcementDao.save(announcement);
		return R.ok();
	}
	
	public R update(Announcement announcement){
		announcementDao.update(announcement);
		return R.ok();
	}
	
	public void deleteBatch(Long[] ids) {
		announcementDao.deleteBatch(ids);
		
	}
	
	public Announcement queryObject(Long id) {
		return announcementDao.queryObject(id);
	}
	
}
